import type { SkuStock } from '@/models/SkuStock'
import type { CommonResult } from '@/models/request'
import request from '@/utils/request'
export function fetchList(pid: number, params: { keyword: string }) {
  return request<CommonResult<SkuStock[]>>({
    url: '/sku/' + pid,
    method: 'get',
    params: params,
  })
}

export function update(pid: number, data: SkuStock[]) {
  return request<CommonResult>({
    url: '/sku/update/' + pid,
    method: 'post',
    data: data,
  })
}
